﻿using System;
using System.Collections.Generic;

namespace Meqs.Entity
{
    /// <summary>
    /// 教师信息
    /// </summary>
    [Serializable]
    public class TeacherInfo
    {
        public TeacherInfo(int mRid, string mTeachCode, string mTeachName, string mPass, short mSexy, DateTime mBirthday, DateTime mInSchoolDate, bool? mISEffect, short mISAdmin, string mSchoolMark, string mTeachNamePinYin)
        {
            m_RID = mRid;
            m_TeachCode = mTeachCode;
            m_TeachName = mTeachName;
            m_Pass = mPass;
            m_Sexy = mSexy;
            m_Birthday = mBirthday;
            m_InSchoolDate = mInSchoolDate;
            m_IsEffect = mISEffect;
            m_IsAdmin = mISAdmin;
            m_SchoolMark = mSchoolMark;
            m_TeachNamePinYin = mTeachNamePinYin;
        }

        public TeacherInfo()
        {
            m_RID = 0;

        }

        #region RID

        private int m_RID;

        public int RID
        {
            get { return m_RID; }
            set { m_RID = value; }
        }

        #endregion

        #region TeachCode

        private string m_TeachCode;

        public string TeachCode
        {
            get { return m_TeachCode; }
            set { m_TeachCode = value; }
        }

        #endregion

        #region TeachName

        private string m_TeachName;

        public string TeachName
        {
            get { return m_TeachName; }
            set { m_TeachName = value; }
        }

        #endregion

        #region Passwd

        private string m_Pass;

        public string Passwd
        {
            get { return m_Pass; }
            set { m_Pass = value; }
        }

        #endregion

        #region Sexy

        private short m_Sexy;

        public short Sexy
        {
            get { return m_Sexy; }
            set { m_Sexy = value; }
        }
        #endregion

        #region Birthday

        private DateTime m_Birthday;

        public DateTime Birthday
        {
            get { return m_Birthday; }
            set { m_Birthday = value; }
        }
        #endregion

        #region InSchoolDate

        private DateTime m_InSchoolDate;

        public DateTime InSchoolDate
        {
            get { return m_InSchoolDate; }
            set { m_InSchoolDate = value; }
        }
        #endregion

        #region IsEffect

        private bool? m_IsEffect;

        public bool? IsEffect
        {
            get { return m_IsEffect; }
            set { m_IsEffect = value; }
        }

        #endregion

        #region IsAdmin

        private short m_IsAdmin;

        public short IsAdmin
        {
            get { return m_IsAdmin; }
            set { m_IsAdmin = value; }
        }
        #endregion

        #region SchoolMark

        private string m_SchoolMark;

        public string SchoolMark
        {
            get { return m_SchoolMark; }
            set { m_SchoolMark = value; }
        }

        #endregion

        #region TeachNamePinYin

        private string m_TeachNamePinYin;

        public string TeachNamePinYin
        {
            get { return m_TeachNamePinYin; }
            set { m_TeachNamePinYin = value; }
        }
        #endregion

        #region Rewrite Equals and HashCode

        /// <summary>
        /// 
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj) return true;
            if ((obj == null) || (obj.GetType() != GetType())) return false;
            TeacherInfo castObj = (TeacherInfo)obj;
            return (castObj != null)
 && m_RID == castObj.RID;
        }

        /// <summary>
        /// 用唯一值实现GetHashCode
        /// </summary>
        public override int GetHashCode()
        {
            int hash = 28;
            hash = hash * 28
 * m_RID.GetHashCode(); return hash;
        }

        #endregion


    }

    /// <summary>
    /// 教师信息
    /// </summary>
    [Serializable]
    public class CustomTeacherInfo
    {
        public CustomTeacherInfo(int mRid, string mTeachCode, string mTeachName, string mClsSubName)
        {
            m_RID = 0;
            m_TeachCode = mTeachCode;
            m_TeachName = mTeachName;
            m_ClsSubName = mClsSubName;
        }

        public CustomTeacherInfo()
        {
            m_RID = 0;
        }

        #region RID

        private int m_RID;

        public int RID
        {
            get { return m_RID; }
            set { m_RID = value; }
        }

        #endregion

        #region TeachCode

        private string m_TeachCode;

        public string TeachCode
        {
            get { return m_TeachCode; }
            set { m_TeachCode = value; }
        }

        #endregion

        #region TeachName

        private string m_TeachName;

        public string TeachName
        {
            get { return m_TeachName; }
            set { m_TeachName = value; }
        }

        #endregion

        #region ClsSubName

        private string m_ClsSubName;

        public string ClsSubName
        {
            get { return m_ClsSubName; }
            set { m_ClsSubName = value; }
        }

        #endregion
    }

    /// <summary>
    /// 教师信息
    /// </summary>
    [Serializable]
    public class TeacherInfoExtendCauseInfo : TeacherInfo
    {
        public TeacherInfoExtendCauseInfo()
        {
        }

        public TeacherInfoExtendCauseInfo(int mRid, string mTeachCode, string mTeachName, string mPass, short mSexy, DateTime mBirthday, DateTime mInSchoolDate, bool? mISEffect, short mISAdmin, string mSchoolMark, string mTeachNamePinYin, string causeName)
            : base(mRid, mTeachCode, mTeachName, mPass, mSexy, mBirthday, mInSchoolDate, mISEffect, mISAdmin, mSchoolMark, mTeachNamePinYin)
        {
            _causeName = causeName;
        }

        private string _causeName;

        public string CauseName
        {
            get { return _causeName; }
            set { _causeName = value; }
        }
    }

    [Serializable]
    public class VTeacherInfo : TeacherInfo
    {
        public VTeacherInfo()
        {
        }

        public VTeacherInfo(int mRid, string mTeachCode, string mTeachName, string mPass, short mSexy, DateTime mBirthday, DateTime mInSchoolDate, bool? mISEffect, short mISAdmin, string mSchoolMark, string mTeachNamePinYin,
                           string sexyStr, string birthdayStr, string inSchoolDateStr)
            : base(mRid, mTeachCode, mTeachName, mPass, mSexy, mBirthday, mInSchoolDate, mISEffect, mISAdmin, mSchoolMark, mTeachNamePinYin)
        {
            m_SexyStr = sexyStr;
            m_BirthdayStr = birthdayStr;
            m_InSchoolDateStr = inSchoolDateStr;
        }

        #region SexyStr

        private string m_SexyStr;

        public string SexyStr
        {
            get { return m_SexyStr; }
            set { m_SexyStr = value; }
        }
        #endregion

        #region BirthdayStr

        private string m_BirthdayStr;

        public string BirthdayStr
        {
            get { return m_BirthdayStr; }
            set { m_BirthdayStr = value; }
        }
        #endregion

        #region InSchoolDateStr

        private string m_InSchoolDateStr;

        public string InSchoolDateStr
        {
            get { return m_InSchoolDateStr; }
            set { m_InSchoolDateStr = value; }
        }
        #endregion
    }

    [Serializable]
    public class HeaderInfo
    {

        public HeaderInfo()
        { 
        }

        #region RID

        private int m_RID;

        public int RID
        {
            get { return m_RID; }
            set { m_RID = value; }
        }

        #endregion

        #region TeachCode

        private string m_TeachCode;

        public string TeachCode
        {
            get { return m_TeachCode; }
            set { m_TeachCode = value; }
        }

        #endregion

        #region TeachName

        private string m_TeachName;

        public string TeachName
        {
            get { return m_TeachName; }
            set { m_TeachName = value; }
        }

        #endregion

        #region ClsID

        private int m_ClsID;

        public int ClsID
        {
            get { return m_ClsID; }
            set { m_ClsID = value; }
        }

        #endregion

        #region ClsName

        private string m_ClsName;

        public string ClsName
        {
            get { return m_ClsName; }
            set { m_ClsName = value; }
        }

        #endregion
    }
}